package string;

import java.util.function.DoubleToIntFunction;

/**
 * boolean startsWith(String str)
 * boolean endsWith(String str)
 * 判断当前字符串是否是以给定内容开始或结尾的
 */
public class StartsWithDemo {
    public static void main(String[] args) {
        String str="www.baidu.con";
        boolean s=str.startsWith("www.");
        boolean t=str.endsWith("con");
        System.out.println(s);
        System.out.println(t);
    }
}
